package pnu.ssm.sort;

public class BubbleSort {
	
	// Order of N^2
	public static void main(String[] args) {
		
		int arr[] = { 100,22,44,52,1834,183,11,0,-11,-52 };
		
		for(int i=0; i<arr.length-1; i++){
			for(int j=1; j<arr.length-i; j++){
				if(arr[j-1] > arr[j]){
					int temp = arr[j];
					arr[j] = arr[j-1];
					arr[j-1] = temp;
				}
			}
		}
		
		for(int i=0; i<arr.length; i++){
			System.out.print(arr[i]+" ");
		}
		
	}
}
